﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace Imladris.Entities
{
    using System;
    using System.Collections.Generic;
    using Imladris.Common.Interfaces;

    public partial class Document : IObjectWithState
    {
        public Imladris.Common.Interfaces.State State { get; set; }       
    }

    public partial class DocumentChange : IObjectWithState
    {
        public Imladris.Common.Interfaces.State State { get; set; }       
    }

    public partial class DocumentPerson : IObjectWithState
    {
        public Imladris.Common.Interfaces.State State { get; set; }
    }

    public partial class DocumentRight : IObjectWithState
    {
        public Imladris.Common.Interfaces.State State { get; set; }
    }

    public partial class DocumentVersion : IObjectWithState
    {
        public Imladris.Common.Interfaces.State State { get; set; }
    }

    #region CodeLists

    public partial class Eployee : ICodeList
    {
        public string Code
        {
            get { return FulName; }
            set { throw new NotImplementedException(); }
        }

        public string Description
        {
            get { return FulName; }
            set { throw new NotImplementedException(); }
        }

        public string FulName
        {
            get { return Person != null ? Person.FirstName + " " + Person.LastName : null; }
            set { throw new NotImplementedException(); }
        }
    }

    public partial class Person : ICodeList
    {
        public string Code
        {
            get { return FullName; }
            set { throw new NotImplementedException(); }
        }

        public string Description
        {
            get { return FullName; }
            set { throw new NotImplementedException(); }
        }

        public string FullName
        {
            get
            {
                return (FirstName + " " + LastName);
            }
        }        
    }

   #endregion

}
